Android Open Source Component-----Android Loopview Unlimited Auto rotate control2015-12-28 15:26 by Jerry Education, 32 reading, 0 reviews, Favorites, compilation
First, the introduction of components
App products in the head of the information list will have automatic rotation of advertisin
Program code implementation enable or disable the Windows 8.1 tablet's own active rotation featureMethod One: Use the Setdisplayautorotationpreferences function function#include Method Two: Set by the Write register to enable.1 means enable self-active rotation, 0 to prevent self-rotationThe location of the detailed key is as follows:Key_local_machine\software\microsoft\windows\currentversion\autorotation Set the Windows 8.1 screen to rotate your code
Auto-Rotate (autorotation): Enables applications to be used in portrait mode (long and narrow) or landscape mode (short and wide), enabling you to change the orientation of the application while rotating the device. Apple recommends that most applications on the ipad should support all directions. For iphone apps, the basic principle is that if auto-rotation enh
As shown in, when processing the default orientation of the screen, you can select here. There are four directions in the top, bottom, and left directions.
The planning requirement is that the game uses a horizontal screen, but requires automatic rotation in two directions, as shown in, my settings are as follows.Default orientation * auto roation indicates that the game supports automatic screen rotation, provided that the mobile phone does not lock
This article mainly introduces how to use rotate to achieve the effect of continuous rotation of images in Android . Android platform provides two kinds of animation, one is Tween animation, that is, through the scene of the object constantly do image transformation (translation, scaling, rotation) to produce animation effect; the second type is Frame animation,
When customizing the control and using the Surfaceview to lock the canvas with Serfaceholder to draw the game, the tank picture needs to be drawn according to the direction of the tank, so the canvas's rotate (float Degrees) method, tried many times to cause the picture on the screen to be a mess, not according to the imagination. After a lot of attempts finally mastered a rule:The canvas rotates following when it is drawn:1, Canvas.draw (bitmap, left
Type of animationAndroid animation is made up of four different typesin XML
Alpha
Gradient Transparency Animation effect
Scale
Gradient Dimension Stretch animation effect
Translate
Move animation effect on picture transition position
Rotate
Picture Transfer rotation animation effect
In Javacode
Alphaanimation
Gradient Transparency Animation
provide timing.Interpolatedtime is 0~1, which is the percentage of time.Animation ani=new Animation () {@Overrideprotected void applytransformation (float interpolatedtime,transformation t) {/ /TODO auto-generated method Stubmyview.setdegree ((int) (INTERPOLATEDTIME*300F));}; Ani.setduration (n); Myview.startanimation (ANI);//===========================================================================Define your own view, setdegress can change the arc
1. click the button, specify the action and uri, and set the result code (ResultCode) to reach the Gallery of the default album on the mobile phone.
The Code is as follows:1. public void onClick (View v ){2. // TODO Auto-generated method stub3. Intent intent = new Intent (Intent. ACTION_PICK,4. android. provider. MediaStore. Images. Media. EXTERNAL_CONTENT_URI); // start the Photo Gallery5. startActivityFo
of less than 1.0 indicates a contractionValue greater than 1.0 indicates magnification
Toxscale [float]Toyscale[float]
Stretch dimensions on X, y coordinates at the end of the animation
Pivotx[float]Pivoty[float]
is the starting position of the animation's x and Y coordinates relative to the object
Attribute value Description: value from 0%-100%, 50% is the midpoint position on the x or y direction coordinate of the object
The previous article described Android taking photos, saved and displayed in the ImageView control, which continues to describe the Android image processing technology, including: by opening pictures in the album, using the Matrix to zoom, rotate, move, contrast, brightness, Saturation operation, we hope to help you.one. Show Open picturefirst, set the Activity_m
animation ends, the scaling dimensions on the X and y coordinates
Pivotx[float]Pivoty[float]
The start position of the x and Y coordinates of the animation relative to the object
Property value Description: From 0%-100%, 50% is the midpoint position on the x or Y coordinate of the object
table four
translate
picture conversion position Move animation effect
android:fromxde
Type of animation Android animation is made up of four different types in XML Alpha gradient Transparency animation effect Scale gradient dimension stretch animation effect Translate picture conversion position Move animation effect Rotate Picture Transfer rotation animation effect In Javacode Alphaanimation Gradient Transparency animation effect Scaleanimation Gradient dimension stretch animation
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.